package com.lhkj.ct.meta.modules.patient.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lhkj.ct.base.enums.PatSourceEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 档案来源
 * </p>
 *
 * @author jobob
 * @since 2023-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblPatSource对象", description="档案来源")
public class TblPatSource implements Serializable {

    private static final long serialVersionUID = 1L;

    public TblPatSource() {
    }

    public TblPatSource(String patId, PatSourceEnum sourceType, String createBy) {
        this.patId = patId;
        this.sourceType = sourceType;
        this.createBy = createBy;
        this.createTime = LocalDateTime.now();
    }

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "档案id")
    private String patId;

    @ApiModelProperty(value = "来源类型")
    private PatSourceEnum sourceType;

    @ApiModelProperty(value = "创建人（用户自己则为空）")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;


}
